/*
 * CTextureManager.h
 *
 *  Created on: Sep 6, 2011
 *      Author: welcome
 */

#ifndef CTEXTUREMANAGER_H_
#define CTEXTUREMANAGER_H_

#include <ac3dui/ac.h>
#include <string>
#include <map>
#include "CTexture.h"

namespace GGEngine {

using namespace std;

typedef map<std::string, GLuint>	TextureMap;

class CTextureManager {

public:
	CTextureManager();

	virtual ~CTextureManager();

	/**
	 * Width of the last image.
	 */
	static GLuint		width;

	/**
	 * Height of the last image.
	 */
	static GLuint		height;

	/**
	 * Format of the last pixel data.
	 */
	static GLenum 		format;

	static GLvoid deleteAllTextures();

	static GLvoid deleteTexture(std::string textureName);

	static KDuint getTexture(std::string filename, ExtType type, GLuint &textureName );

private:
	static TextureMap textures;
};

} /* namespace GGEngine */
#endif /* CTEXTUREMANAGER_H_ */
